import axios from 'axios';
export const downloadTemplate = function (scheduleType) {
    axios.get('/interface/user/spExcel', {
        params: {
            "stime": "2018-02-26",
            "etime":"2018-02-26"
        },
        responseType: 'arraybuffer'
    }).then((response) => {
        //创建一个blob对象,file的一种
        let blob = new Blob([response.data], { type: 'application/x-xls' })
        let link = document.createElement('a')
        link.href = window.URL.createObjectURL(blob)
        link.download = "1312"+ '_' + response.headers.datestr + '.xls'
        link.click();
    })
}